%               description
% function generates an array of numbers by the formula:
% A_const * ( exp(-time(i)/tau_1) - exp(-time(i)/tau_2) )
% input data:
% A_const - dimensional coefficient
% time() - array of time
% tau_1, tau_2 - exponential coefficients

function [ results ] = V6_exp( tau_1, tau_2, A_const, time )
    len = length(time);        
    results = zeros(1, len);
    for i = 1:len
        if ( time(i) >= 0 && tau_1 ~= 0 && tau_2 ~=0 && A_const ~= 0)
            results(i) = A_const * ( exp(-time(i)/tau_1) - exp(-time(i)/tau_2) );
        end
        if ( tau_1 == 0 && tau_2 ~= 0)
            results(i) = A_const * ( - exp(-time(i)/tau_2) );
        end
        if ( tau_1 ~= 0 && tau_2 == 0 )
            results(i) = A_const * ( exp(-time(i)/tau_1) );
        end
    end
end

